package com.boil.qz.safekavass.service;

import com.boil.qz.safekavass.dao.MybatisDao;
import com.boil.qz.safekavass.model.Notice;
import com.boil.qz.safekavass.pojo.NoticeVo;
import com.boil.qz.safekavass.repository.NoticeRepository;
import com.boil.util.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by ChenYong on 2017-04-17.
 * <br>
 * 通知 Service。
 */
@Service
public class NoticeService extends JpaRepositoryService<Notice, Long> {
    /**
     * 注入 Mybatis Dao
     */
    @Autowired
    private MybatisDao mybatisDao;
    /**
     * 注入通知实体仓库
     */
    @Autowired
    private NoticeRepository noticeRepository;

    /**
     * 分页查询通知。
     *
     * @param page 分页实例
     */
    public void findInPage(Page<NoticeVo> page) {
        mybatisDao.selectInPage("noticeVoNs.findInPage", page);
    }
}